Skip to content

Stubtest: check that the stub is abstract if the runtime is, even when the stub is an overloaded method#14955

Merged
sobolevn merged 1 commit intopython:masterfrom
AlexWaygood:stubtest-overloaded-abstract
Mar 24, 2023
Merged

Stubtest: check that the stub is abstract if the runtime is, even when the stub is an overloaded method#14955
sobolevn merged 1 commit intopython:masterfrom
AlexWaygood:stubtest-overloaded-abstract

Conversation

@AlexWaygood
Copy link
Copy Markdown
Member

#13323 means that stubtest will currently emit an error if the runtime is decorated with @abstractmethod but the stub is not, but only if the stub is not an overloaded function, as overloaded functions have a different internal representation in mypy. This PR fixes that discrepancy.

Copy link
Copy Markdown
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thanks!

@sobolevn sobolevn merged commit 2c6e43e into python:master Mar 24, 2023
@AlexWaygood AlexWaygood deleted the stubtest-overloaded-abstract branch March 24, 2023 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants